<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>父子组件传值</title>
		<script src="../vue.js"></script>
	</head>
	<body>
		<div id="app">
			<h1>图片显示</h1> 
			<item picpath="../../day7/1.jpg"></item>
		</div>
		<template id="p1">
			<div id="d1">
				<h1>当前图片的地址是{{picpath}}</h1>
				<img :src="picpath"/>
			</div>
		</template>
		<script>
		  var vm=new Vue({
			  el:'#app',
			  components:{
				  'item':{
					  template:'#p1',
					  props:['picpath']
				  }
			  }
		  })
		</script>
	</body>
</html>
